package com.yongcheon.starhealthcare.friend.fragment;

import android.app.ActionBar;
import android.app.FragmentTransaction;
import android.support.v4.view.ViewPager;

/**
 * Created by yongcheon on 2015-02-06.
 */
public class Friend_FragementListener implements ActionBar.TabListener {
    private ViewPager mViewPager;

    public Friend_FragementListener(ViewPager mViewPager) {
        this.mViewPager = mViewPager;
    }

    @Override
    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
        mViewPager.setCurrentItem(tab.getPosition());
    }

    @Override
    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
    }

    @Override
    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
    }
}
